package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.VO.sdk.VisitorServerGetListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      访客机API数据访问接口
 * </desc>
 *
 * @createDate 2019/04/29
 */
@Mapper
@Repository
public interface IVisitorServerDao {
    /**
     * <desc>
     *      验证身份信息
     * </desc>
     *
     * @param appid
     * @param appSecret
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
     Integer checkIdentity(@Param("projectId") String projectId, @Param("appid") String appid, @Param("appSecret") String appSecret);

    /**
     * <desc>
     *      获取单元列表
     * </desc>
     * @param projectId
     * @param buildId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    List<Map<String,Object>> getUnits(@Param("projectId") String projectId, @Param("buildId") String buildId);

    /**
     * <desc>
     *      获取房间列表
     * </desc>
     *
     * @param projectId
     * @param unitId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    List<Map<String,Object>> getRooms(@Param("projectId") String projectId, @Param("unitId") String unitId);

    /**
     * <desc>
     *      获取楼栋信息
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    List<Map<String,Object>> getBuilds(@Param("projectId") String projectId);

    /**
     * <desc>
     *      获取分页列表数据
     * </desc>
     *
     * @param params
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    List<VisitorServerGetListVO> getPage(Map<String,Object> params);

    /**
     * <desc>
     *      获取分页列表数据总数
     * </desc>
     *
     * @param params
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    Integer getPageCount(Map<String,Object> params);

    /**
     * <desc>
     *      查询地址
     * </desc>
     *
     * @param roomId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    String getVisitAddress(@Param("roomId") String roomId);

    /**
     * <desc>
     *      根据访客单查询访客单id
     * </desc>
     *
     * @param visitorNo
     * @return
     * @author Jiaqi.X
     * @createDate  2019/04/29
     */
    String getPassIdByVisitorNo(@Param("visitorNo") String visitorNo);
}
